#ifndef GENERALINIT_H
#define GENERALINIT_H

#define LED1 _LATB4
#define LED2 _LATB5
#define LED3 _LATB6
#define LED4 _LATB15
#define RFIDEN _LATA0
#define RFIDSS _LATB9
#define RS485DE _LATC0
#define RS485RE_n _LATC1
#define IR1 interrupts.ir1Interrupt
#define IR2 interrupts.ir2Interrupt

#define STARTTIME \
	TMR2 = 0; \
	TMR3 = 0; \
	T2CONbits.TON = 1

#define STOPTIME T2CONbits.TON = 0

#define NOSC_PRI	2

void __attribute__((__interrupt__)) _OscillatorFail(void);
void __attribute__((__interrupt__)) _AddressError(void);
void __attribute__((__interrupt__)) _StackError(void);
void __attribute__((__interrupt__)) _MathError(void);
void initPins(void);
extern void clockSwitch(unsigned int r);

#endif
